<!-- 名片审核详情 -->
<template>
  <div class='card_detail'>
    <Row class="header_content" type="flex" justify="space-between">
      <Col span="">
      <Avatar class="avater" icon="ios-person" size="large" :src="info.avatarUrl"
        v-if="info.avatarUrl" />
      </Col>
      <Col span="">
      <Button type="info" @click="onAudit" v-if="unlocking('0206070100')">审批</Button>
      </Col>
    </Row>
    <dt-info ref='info' :labelWidth='120' :options='options' :info="info">
    </dt-info>
    <audit-modal ref="audit" />
  </div>
</template>

<script>
  import companyApi from '@/biz/backStage/companyCard'
  import auditModal from '@/components/biz/audit/audit-modal.vue'
  import auditDetail from './opt/auditDetailOpt'
  export default {
    components: { auditModal },
    data() {
      return {
        options: [],
        info: {},
      };
    },
    methods: {
      onAudit() {
        this.$refs.audit.show({
          auditId: this.$route.query.auditId,
          businessId: this.$route.query.businessId,
          auditType: 8
        })
      },
      init() {
        let params = {
          userCardAuditId: this.$route.query.businessId
        }
        companyApi.getByUserCardAuditId(params).then(res => {
          console.log(res)
          this.info = { ...res }
        })
      }
    },
    mounted() {
      this.init()
      this.options = auditDetail.options(this)
    },
  }
</script>
<style lang='scss' scoped>
  .card_detail {
    padding: 30px 20px;

    .header_content {
      margin-bottom: 20px;
    }

    .avater {
      width: 70px;
      height: 70px;
      margin-left: 40px;
    }
  }
</style>